package com.ruoyi.patrol.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.patrol.mapper.PatrolTaskPointMapper;
import com.ruoyi.patrol.domain.PatrolTaskPoint;
import com.ruoyi.patrol.service.IPatrolTaskPointService;

/**
 * 点位打卡Service业务层处理
 * 
 * @author yepanpan
 * @date 2025-05-08
 */
@Service
public class PatrolTaskPointServiceImpl implements IPatrolTaskPointService 
{
    private static final Logger log = LoggerFactory.getLogger(PatrolTaskPointServiceImpl.class);

    @Autowired
    private PatrolTaskPointMapper patrolTaskPointMapper;

    /**
     * 查询点位打卡
     * 
     * @param id 点位打卡主键
     * @return 点位打卡
     */
    @Override
    public PatrolTaskPoint selectPatrolTaskPointById(Long id)
    {
        return patrolTaskPointMapper.selectPatrolTaskPointById(id);
    }

    /**
     * 查询点位打卡列表
     * 
     * @param patrolTaskPoint 点位打卡
     * @return 点位打卡
     */
    @Override
    public List<PatrolTaskPoint> selectPatrolTaskPointList(PatrolTaskPoint patrolTaskPoint)
    {
        return patrolTaskPointMapper.selectPatrolTaskPointList(patrolTaskPoint);
    }

    /**
     * 新增点位打卡
     * 
     * @param patrolTaskPoint 点位打卡
     * @return 结果
     */
    @Override
    public int insertPatrolTaskPoint(PatrolTaskPoint patrolTaskPoint)
    {
        patrolTaskPoint.setCreateTime(DateUtils.getNowDate());
        return patrolTaskPointMapper.insertPatrolTaskPoint(patrolTaskPoint);
    }

    /**
     * 修改点位打卡
     * 
     * @param patrolTaskPoint 点位打卡
     * @return 结果
     */
    @Override
    public int updatePatrolTaskPoint(PatrolTaskPoint patrolTaskPoint)
    {
        patrolTaskPoint.setUpdateTime(DateUtils.getNowDate());
        return patrolTaskPointMapper.updatePatrolTaskPoint(patrolTaskPoint);
    }

    /**
     * 批量删除点位打卡
     * 
     * @param ids 需要删除的点位打卡主键
     * @return 结果
     */
    @Override
    public int deletePatrolTaskPointByIds(Long[] ids)
    {
        return patrolTaskPointMapper.deletePatrolTaskPointByIds(ids);
    }

    /**
     * 删除点位打卡信息
     * 
     * @param id 点位打卡主键
     * @return 结果
     */
    @Override
    public int deletePatrolTaskPointById(Long id)
    {
        return patrolTaskPointMapper.deletePatrolTaskPointById(id);
    }


}
